<html>
   <head>
      <link rel="stylesheet" type="text/css" href="style.css" />
   </head>
   <body onload="">
<h2 class="comptitle">Compound Module <i>Nic802154_TI_CC2420</i></h2>
<b>Package:</b> org.mixim.modules.nic<br/><b>File: <a href="modules-nic-Nic802154_TI_CC2420.ned.html">modules/nic/Nic802154_TI_CC2420.ned</a></b><br/>
<p>This NIC implements a Texas Instruments CC 2420 802.15.4 network interface card
using the CSMA protocol as specified in IEEE 802.15.4-2006.</p>
<p>Note: To be able to use this Nic in your simulation you have to copy the file 
"Nic802154_TI_CC2420_Decider.xml" from "modules/nic/" to your simulation directory.</p>
<p><b>Author:</b> Jerome Rousselot</p>
<img src="org.mixim.modules.nic.Nic802154_TI_CC2420-type.png" ismap="yes" usemap="#type-diagram"/><map name="type-diagram">
<area shape="rect" href="org.mixim.modules.phy.PhyLayerBattery.html" title="PhyLayerBattery" alt="PhyLayerBattery" coords="78,258,122,319">
<area shape="rect" href="org.mixim.modules.mac.CSMA802154.html" title="CSMA802154" alt="CSMA802154" coords="78,109,122,170">
</map>
<h3 class="subtitle">Usage diagram:</h3>
<p>The following diagram shows usage relationships between types.
Unresolved types are missing from the diagram. Click <a href="full-ned-usage-diagram.html">here</a> to see the full picture.</p>
<img src="org.mixim.modules.nic.Nic802154_TI_CC2420-usage.png" ismap="yes" usemap="#usage-diagram"/><map name="usage-diagram"><area shape="rect" id="node1" href="org.mixim.modules.nic.Nic802154_TI_CC2420.html" title="Compound Module Nic802154_TI_CC2420" alt="" coords="100,83,257,111">
<area shape="rect" id="node2" href="ned.IdealChannel.html" title="Channel IdealChannel" alt="" coords="5,161,104,189">
<area shape="rect" id="node4" href="org.mixim.modules.mac.CSMA802154.html" title="Simple Module CSMA802154" alt="" coords="128,161,229,189">
<area shape="rect" id="node6" href="org.mixim.modules.phy.PhyLayerBattery.html" title="Simple Module PhyLayerBattery" alt="" coords="253,161,371,189">
<area shape="rect" id="node8" href="org.mixim.modules.node.Host802154_2400MHz.html" title="Compound Module Host802154_2400MHz" alt="" coords="27,6,181,34">
<area shape="rect" id="node10" href="org.mixim.examples.ieee802154Narrow.PhyMacHost.html" title="Compound Module PhyMacHost" alt="" coords="205,6,304,34">
</map>
<h3 class="subtitle">Inheritance diagram:</h3>
<p>The following diagram shows inheritance relationships for this type.
Unresolved types are missing from the diagram. Click <a href="full-ned-inheritance-diagram.html">here</a> to see the full picture.</p>
<img src="org.mixim.modules.nic.Nic802154_TI_CC2420-inheritance.png" ismap="yes" usemap="#inheritance-diagram"/><map name="inheritance-diagram"><area shape="rect" id="node1" href="org.mixim.modules.nic.Nic802154_TI_CC2420.html" title="Compound Module Nic802154_TI_CC2420" alt="" coords="5,83,163,111">
<area shape="rect" id="node2" href="org.mixim.modules.nic.INic.html" title="Module Interface INic" alt="" coords="48,6,120,34">
</map>
<h3 class="subtitle">Used in compound modules:</h3>
<p>If a module type shows up more than once, that means it has been defined in more than one NED file.</p>
<table>
<tr>
   <td>
      <a href="org.mixim.modules.node.Host802154_2400MHz.html">Host802154_2400MHz</a>
      <i> (compound&nbsp;module)</i>
   </td>
   <td>

<p>This NED module defines a host using an IEEE 802.15.4 transceiver at 2.4GHz
for wireless communications, that can be used to simulate wireless sensor
networks. </p>
   </td>
</tr>
<tr>
   <td>
      <a href="org.mixim.examples.ieee802154Narrow.PhyMacHost.html">PhyMacHost</a>
      <i> (compound&nbsp;module)</i>
   </td>
   <td>
<i>(no description)</i>
   </td>
</tr>
</table>
<h3 class="subtitle">Parameters:</h3>
<table class="paramtable">
   <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Default value</th>
      <th>Description</th>
   </tr>
<tr class="local">
   <td width="150">connectionManagerName</td>
   <td width="100">
      <i>string</i>
   </td>
   <td width="120">""</td>
   <td>
<p>name of the <a href="org.mixim.base.connectionManager.ConnectionManager.html">ConnectionManager</a> module</p>
   </td>
</tr>
<tr class="local">
   <td width="150">sleepCurrent</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">0.000021mA</td>
   <td>
<p>power consumption from boards (at 3.3V)</p>
   </td>
</tr>
<tr class="local">
   <td width="150">rxCurrent</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">18.8 mA</td>
   <td>   </td>
</tr>
<tr class="local">
   <td width="150">decodingCurrentDelta</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">0 mA</td>
   <td>   </td>
</tr>
<tr class="local">
   <td width="150">txCurrent</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">17.4 mA</td>
   <td>   </td>
</tr>
<tr class="local">
   <td width="150">setupRxCurrent</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">0.6391mA</td>
   <td>
<p>0.002109 W = (ESetupPower+ESetupXtal+ETxCalibrate)/TSetupTx</p>
   </td>
</tr>
<tr class="local">
   <td width="150">setupTxCurrent</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">0.6845mA</td>
   <td>
<p>0.002259 W = (ESetupPower+ESetupXtal+ERxCalibrate)/TSetupRx</p>
   </td>
</tr>
<tr class="local">
   <td width="150">rxTxCurrent</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">18.8 mA</td>
   <td>
<p>Upper bound</p>
   </td>
</tr>
<tr class="local">
   <td width="150">txRxCurrent</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">18.8 mA</td>
   <td>
<p>idem</p>
   </td>
</tr>
</table>
<h3 class="subtitle">Gates:</h3>
<table class="paramtable">
   <tr>
      <th>Name</th>
      <th>Direction</th>
      <th>Size</th>
      <th>Description</th>
   </tr>
<tr class="local">
   <td width="150">upperGateIn</xsl:if></td>
   <td width="100"><i>input</i></td>
   <td width="50"></td>   <td>
<p>from upper layers</p>
</td>
</tr>
<tr class="local">
   <td width="150">radioIn</xsl:if></td>
   <td width="100"><i>input</i></td>
   <td width="50"></td>   <td>
<p>to receive AirFrames</p>
</td>
</tr>
<tr class="local">
   <td width="150">upperGateOut</xsl:if></td>
   <td width="100"><i>output</i></td>
   <td width="50"></td>   <td>
<p>to upper layers</p>
</td>
</tr>
<tr class="local">
   <td width="150">upperControlOut</xsl:if></td>
   <td width="100"><i>output</i></td>
   <td width="50"></td>   <td>
<p>control connection</p>
</td>
</tr>
<tr class="local">
   <td width="150">upperControlIn</xsl:if></td>
   <td width="100"><i>input</i></td>
   <td width="50"></td>   <td>
</td>
</tr>
</table>
<h3 class="subtitle">Unassigned submodule parameters:</h3>
<table class="paramtable">
   <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Default value</th>
      <th>Description</th>
   </tr>
<tr>
   <td><a href="org.mixim.modules.phy.PhyLayerBattery.html">phy</a>.coreDebug</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>debug switch for core framework</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.phy.PhyLayerBattery.html">phy</a>.recordStats</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120">false</td>
   <td>
<p>enable/disable tracking of statistics (eg. cOutvectors)</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.phy.PhyLayerBattery.html">phy</a>.usePropagationDelay</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>Should transmission delay be simulated?</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.phy.PhyLayerBattery.html">phy</a>.useThermalNoise</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>should thermal noise be considered?</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.phy.PhyLayerBattery.html">phy</a>.analogueModels</td>
   <td width="100">
      <i>xml</i>
   </td>
   <td width="120"></td>
   <td>
<p>Specification of the analogue models to use and their parameters</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.phy.PhyLayerBattery.html">phy</a>.sensitivity</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>The sensitivity of the physical layer [dBm]</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.phy.PhyLayerBattery.html">phy</a>.maxTXPower</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>The maximum transimission power of the physical layer [mW]</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.phy.PhyLayerBattery.html">phy</a>.initialRadioState</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120">0</td>
   <td>
<p>state the radio is initially in</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.phy.PhyLayerBattery.html">phy</a>.radioMinAtt</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">1.0</td>
   <td>
<p>radios gain factor (attenuation) while receiving</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.phy.PhyLayerBattery.html">phy</a>.radioMaxAtt</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">0.0</td>
   <td>
<p>radios gain factor (attenuation) while not receiving</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.phy.PhyLayerBattery.html">phy</a>.nbRadioChannels</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120">1</td>
   <td>
<p>Number of available radio channels. Defaults to single channel radio.</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.phy.PhyLayerBattery.html">phy</a>.initialRadioChannel</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120">0</td>
   <td>
<p>Initial radio channel.</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.phy.PhyLayerBattery.html">phy</a>.numActivities</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120">5</td>
   <td>
<p>the number of different power consuming activities the phy layer has
change this parameter if your decider or physical layer uses more
than the default 5 activities (sleep, rx, tx, switching, decoding)</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.mac.CSMA802154.html">mac</a>.notAffectedByHostState</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120">false</td>
   <td>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.mac.CSMA802154.html">mac</a>.coreDebug</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>debug switch</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.mac.CSMA802154.html">mac</a>.debug</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120">false</td>
   <td>
<p>debug switch</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.mac.CSMA802154.html">mac</a>.stats</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120">true</td>
   <td>   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.mac.CSMA802154.html">mac</a>.trace</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120">false</td>
   <td>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.mac.CSMA802154.html">mac</a>.queueLength</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">100</td>
   <td>
<p>size of the MAC queue (maximum number of packets in Tx buffer)</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.mac.CSMA802154.html">mac</a>.txPower</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">1 mW</td>
   <td>
<p>tx power [mW]</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.mac.CSMA802154.html">mac</a>.useMACAcks</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120">true</td>
   <td>
<p>Send/Expect MAC acks for unicast traffic?</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.mac.CSMA802154.html">mac</a>.macMaxFrameRetries</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">3</td>
   <td>
<p>maximum number of frame retransmission
only used when usage of MAC acks is enabled</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.mac.CSMA802154.html">mac</a>.macMaxCSMABackoffs</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">4</td>
   <td>
<p>maximum backoffs</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.mac.CSMA802154.html">mac</a>.contentionWindow</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120">2</td>
   <td>
<p># of backoff periods of the initial contention window
(for linear and constant backoff method only)</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.mac.CSMA802154.html">mac</a>.macMinBE</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">3</td>
   <td>
<p>minimum backoff exponent (for exponential backoff method only)</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.modules.mac.CSMA802154.html">mac</a>.macMaxBE</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">5</td>
   <td>
<p>maximum backoff exponent (for exponential backoff method only)</p>
   </td>
</tr>
</table>
<h3 class="subtitle">Source code:</h3>
<pre class="src"><span style="color: #808080; font-style: italic; ">//
// This NIC implements a Texas Instruments CC 2420 802.15.4 network interface card
// using the CSMA protocol as specified in IEEE 802.15.4-2006.
//
//Note: To be able to use this Nic in your simulation you have to copy the file 
//&quot;Nic802154_TI_CC2420_Decider.xml&quot; from &quot;modules/nic/&quot; to your simulation directory.
// </span><span style="color: #000080; ">@author</span><span style="color: #808080; font-style: italic; "> Jerome Rousselot
//
</span><span style="color: #800000; font-weight: bold; ">module</span><span style="color: #000000; "> </span><span style="color: #000000; ">Nic802154_TI_CC2420</span><span style="color: #000000; "> </span><span style="color: #800000; font-weight: bold; ">like</span><span style="color: #000000; "> </span><span style="color: #000000; ">INic</span><span style="color: #000000; ">
{
    </span><span style="color: #800000; font-weight: bold; ">parameters</span><span style="color: #000000; ">:
        </span><span style="color: #000080; font-weight: bold; ">string</span><span style="color: #000000; "> </span><span style="color: #000000; ">connectionManagerName</span><span style="color: #000000; "> = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">&quot;&quot;</span><span style="color: #000000; ">);   </span><span style="color: #808080; font-style: italic; ">//name of the ConnectionManager module
</span><span style="color: #000000; ">        </span><span style="color: #808080; font-style: italic; ">// power consumption from boards (at 3.3V)
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">sleepCurrent</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">mA</span><span style="color: #000000; ">) = </span><span style="color: #008000; ">0</span><span style="color: #000000; ">.</span><span style="color: #008000; ">000021</span><span style="color: #000000; ">mA</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// 0.021 &micro;A
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">rxCurrent</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">mA</span><span style="color: #000000; ">) = </span><span style="color: #008000; ">18</span><span style="color: #000000; ">.</span><span style="color: #008000; ">8</span><span style="color: #000000; "> </span><span style="color: #000000; ">mA</span><span style="color: #000000; ">;
        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">decodingCurrentDelta</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">mA</span><span style="color: #000000; ">) = </span><span style="color: #008000; ">0</span><span style="color: #000000; "> </span><span style="color: #000000; ">mA</span><span style="color: #000000; ">;
        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">txCurrent</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">mA</span><span style="color: #000000; ">) = </span><span style="color: #008000; ">17</span><span style="color: #000000; ">.</span><span style="color: #008000; ">4</span><span style="color: #000000; "> </span><span style="color: #000000; ">mA</span><span style="color: #000000; ">;
        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">setupRxCurrent</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">mA</span><span style="color: #000000; ">) = </span><span style="color: #008000; ">0</span><span style="color: #000000; ">.</span><span style="color: #008000; ">6391</span><span style="color: #000000; ">mA</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// 0.002109 W = (ESetupPower+ESetupXtal+ETxCalibrate)/TSetupTx
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">setupTxCurrent</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">mA</span><span style="color: #000000; ">) = </span><span style="color: #008000; ">0</span><span style="color: #000000; ">.</span><span style="color: #008000; ">6845</span><span style="color: #000000; ">mA</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// 0.002259 W = (ESetupPower+ESetupXtal+ERxCalibrate)/TSetupRx
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">rxTxCurrent</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">mA</span><span style="color: #000000; ">) = </span><span style="color: #008000; ">18</span><span style="color: #000000; ">.</span><span style="color: #008000; ">8</span><span style="color: #000000; "> </span><span style="color: #000000; ">mA</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// Upper bound
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">txRxCurrent</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">mA</span><span style="color: #000000; ">) = </span><span style="color: #008000; ">18</span><span style="color: #000000; ">.</span><span style="color: #008000; ">8</span><span style="color: #000000; "> </span><span style="color: #000000; ">mA</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// idem
</span><span style="color: #000000; ">
    </span><span style="color: #800000; font-weight: bold; ">gates</span><span style="color: #000000; ">:
        </span><span style="color: #000080; font-weight: bold; ">input</span><span style="color: #000000; "> </span><span style="color: #000000; ">upperGateIn</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// from upper layers
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">input</span><span style="color: #000000; "> </span><span style="color: #000000; ">radioIn</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// to receive AirFrames
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">output</span><span style="color: #000000; "> </span><span style="color: #000000; ">upperGateOut</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// to upper layers
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">output</span><span style="color: #000000; "> </span><span style="color: #000000; ">upperControlOut</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// control connection
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">input</span><span style="color: #000000; "> </span><span style="color: #000000; ">upperControlIn</span><span style="color: #000000; ">;

    </span><span style="color: #800000; font-weight: bold; ">submodules</span><span style="color: #000000; ">:
        </span><span style="color: #000000; ">phy</span><span style="color: #000000; ">: </span><span style="color: #000000; ">PhyLayerBattery</span><span style="color: #000000; "> {
            </span><span style="color: #800000; font-weight: bold; ">parameters</span><span style="color: #000000; ">:
                </span><span style="color: #000000; ">decider</span><span style="color: #000000; "> = </span><span style="color: #800000; font-weight: bold; ">xmldoc</span><span style="color: #000000; ">(</span><span style="color: #008000; ">&quot;Nic802154_TI_CC2420_Decider.xml&quot;</span><span style="color: #000000; ">);
                </span><span style="color: #808080; font-style: italic; ">//publishRSSIAlways = false;
</span><span style="color: #000000; ">                </span><span style="color: #000000; ">headerLength</span><span style="color: #000000; "> = </span><span style="color: #008000; ">48</span><span style="color: #000000; "> </span><span style="color: #000000; ">bit</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// ieee 802.15.4                
</span><span style="color: #000000; ">                </span><span style="color: #000000; ">thermalNoise</span><span style="color: #000000; "> = -</span><span style="color: #008000; ">110</span><span style="color: #000000; "> </span><span style="color: #000000; ">dBm</span><span style="color: #000000; ">;
                </span><span style="color: #808080; font-style: italic; ">// From TI CC1100 datasheet rev. C
</span><span style="color: #000000; ">                </span><span style="color: #000000; ">timeSleepToRX</span><span style="color: #000000; "> = </span><span style="color: #008000; ">0</span><span style="color: #000000; ">.</span><span style="color: #008000; ">001792</span><span style="color: #000000; "> </span><span style="color: #000000; ">s</span><span style="color: #000000; ">;
                </span><span style="color: #000000; ">timeSleepToTX</span><span style="color: #000000; "> = </span><span style="color: #008000; ">0</span><span style="color: #000000; ">.</span><span style="color: #008000; ">001792</span><span style="color: #000000; "> </span><span style="color: #000000; ">s</span><span style="color: #000000; ">;
                </span><span style="color: #000000; ">timeRXToTX</span><span style="color: #000000; "> = </span><span style="color: #008000; ">0</span><span style="color: #000000; ">.</span><span style="color: #008000; ">000192</span><span style="color: #000000; "> </span><span style="color: #000000; ">s</span><span style="color: #000000; ">;
                </span><span style="color: #000000; ">timeTXToRX</span><span style="color: #000000; "> = </span><span style="color: #008000; ">0</span><span style="color: #000000; ">.</span><span style="color: #008000; ">000192</span><span style="color: #000000; "> </span><span style="color: #000000; ">s</span><span style="color: #000000; ">;
                </span><span style="color: #000000; ">timeRXToSleep</span><span style="color: #000000; "> = </span><span style="color: #008000; ">0</span><span style="color: #000000; "> </span><span style="color: #000000; ">s</span><span style="color: #000000; ">;
                </span><span style="color: #000000; ">timeTXToSleep</span><span style="color: #000000; "> = </span><span style="color: #008000; ">0</span><span style="color: #000000; "> </span><span style="color: #000000; ">s</span><span style="color: #000000; ">;
                </span><span style="color: #808080; font-style: italic; ">// power consumption from boards
</span><span style="color: #000000; ">                </span><span style="color: #808080; font-style: italic; ">//                sleepPower = 0.0000000693 W; // 0.021 microA * 3.3 V
</span><span style="color: #000000; ">                </span><span style="color: #808080; font-style: italic; ">//                rxPower = 0.06204 W;   // 18.8 mA * 3.3 V
</span><span style="color: #000000; ">                </span><span style="color: #808080; font-style: italic; ">//                txPower = 0.05742 W;   // 17.4 mA * 3.3 V
</span><span style="color: #000000; ">                </span><span style="color: #808080; font-style: italic; ">//                rxTxPower = 0.06204 W; // Upper bound : 18.8 mA * 3.3 V
</span><span style="color: #000000; ">                </span><span style="color: #808080; font-style: italic; ">//                txRxPower = 0.06204 W; // idem
</span><span style="color: #000000; ">                </span><span style="color: #808080; font-style: italic; ">//                setupTxPower = 0.002109 W; // (ESetupPower+ESetupXtal+ETxCalibrate)/TSetupTx
</span><span style="color: #000000; ">                </span><span style="color: #808080; font-style: italic; ">//                setupRxPower = 0.002259 W; // (ESetupPower+ESetupXtal+ERxCalibrate)/TSetupRx
</span><span style="color: #000000; ">                </span><span style="color: #000000; font-weight: bold; ">@display</span><span style="color: #000000; ">(</span><span style="color: #008000; ">&quot;p=96,236;i=block/wrxtx&quot;</span><span style="color: #000000; ">);

        }
        </span><span style="color: #000000; ">mac</span><span style="color: #000000; ">: </span><span style="color: #000000; ">CSMA802154</span><span style="color: #000000; "> {
            </span><span style="color: #800000; font-weight: bold; ">parameters</span><span style="color: #000000; ">:
                </span><span style="color: #000000; ">rxSetupTime</span><span style="color: #000000; "> = </span><span style="color: #008000; ">0</span><span style="color: #000000; ">.</span><span style="color: #008000; ">001792</span><span style="color: #000000; "> </span><span style="color: #000000; ">s</span><span style="color: #000000; ">;
                </span><span style="color: #000000; ">txPower</span><span style="color: #000000; "> = </span><span style="color: #800000; font-weight: bold; ">default</span><span style="color: #000000; ">(</span><span style="color: #008000; ">1</span><span style="color: #000000; "> </span><span style="color: #000000; ">mW</span><span style="color: #000000; ">);

                </span><span style="color: #000000; font-weight: bold; ">@display</span><span style="color: #000000; ">(</span><span style="color: #008000; ">&quot;p=96,87;i=block/layer&quot;</span><span style="color: #000000; ">);

        }
    </span><span style="color: #800000; font-weight: bold; ">connections</span><span style="color: #000000; ">:

        </span><span style="color: #000000; ">radioIn</span><span style="color: #000000; "> </span><span style="color: #800000; font-weight: bold; ">--&gt;</span><span style="color: #000000; "> </span><span style="color: #000000; ">phy</span><span style="color: #000000; ">.</span><span style="color: #000000; ">radioIn</span><span style="color: #000000; ">;

        </span><span style="color: #000000; ">phy</span><span style="color: #000000; ">.</span><span style="color: #000000; ">upperGateIn</span><span style="color: #000000; "> </span><span style="color: #800000; font-weight: bold; ">&lt;--</span><span style="color: #000000; "> { </span><span style="color: #000000; font-weight: bold; ">@display</span><span style="color: #000000; ">(</span><span style="color: #008000; ">&quot;m=m,25,0,25,0&quot;</span><span style="color: #000000; ">); } </span><span style="color: #800000; font-weight: bold; ">&lt;--</span><span style="color: #000000; "> </span><span style="color: #000000; ">mac</span><span style="color: #000000; ">.</span><span style="color: #000000; ">lowerGateOut</span><span style="color: #000000; ">;
        </span><span style="color: #000000; ">phy</span><span style="color: #000000; ">.</span><span style="color: #000000; ">upperGateOut</span><span style="color: #000000; "> </span><span style="color: #800000; font-weight: bold; ">--&gt;</span><span style="color: #000000; "> { </span><span style="color: #000000; font-weight: bold; ">@display</span><span style="color: #000000; ">(</span><span style="color: #008000; ">&quot;m=m,73,0,50,50&quot;</span><span style="color: #000000; ">); } </span><span style="color: #800000; font-weight: bold; ">--&gt;</span><span style="color: #000000; "> </span><span style="color: #000000; ">mac</span><span style="color: #000000; ">.</span><span style="color: #000000; ">lowerGateIn</span><span style="color: #000000; ">;
        </span><span style="color: #000000; ">phy</span><span style="color: #000000; ">.</span><span style="color: #000000; ">upperControlOut</span><span style="color: #000000; "> </span><span style="color: #800000; font-weight: bold; ">--&gt;</span><span style="color: #000000; "> </span><span style="color: #000000; ">mac</span><span style="color: #000000; ">.</span><span style="color: #000000; ">lowerControlIn</span><span style="color: #000000; ">;
        </span><span style="color: #000000; ">phy</span><span style="color: #000000; ">.</span><span style="color: #000000; ">upperControlIn</span><span style="color: #000000; "> </span><span style="color: #800000; font-weight: bold; ">&lt;--</span><span style="color: #000000; "> </span><span style="color: #000000; ">mac</span><span style="color: #000000; ">.</span><span style="color: #000000; ">lowerControlOut</span><span style="color: #000000; ">;

        </span><span style="color: #000000; ">mac</span><span style="color: #000000; ">.</span><span style="color: #000000; ">upperGateOut</span><span style="color: #000000; "> </span><span style="color: #800000; font-weight: bold; ">--&gt;</span><span style="color: #000000; "> </span><span style="color: #000000; ">upperGateOut</span><span style="color: #000000; ">;
        </span><span style="color: #000000; ">mac</span><span style="color: #000000; ">.</span><span style="color: #000000; ">upperControlOut</span><span style="color: #000000; "> </span><span style="color: #800000; font-weight: bold; ">--&gt;</span><span style="color: #000000; "> </span><span style="color: #000000; ">upperControlOut</span><span style="color: #000000; ">;
        </span><span style="color: #000000; ">mac</span><span style="color: #000000; ">.</span><span style="color: #000000; ">upperGateIn</span><span style="color: #000000; "> </span><span style="color: #800000; font-weight: bold; ">&lt;--</span><span style="color: #000000; "> </span><span style="color: #000000; ">upperGateIn</span><span style="color: #000000; ">;
        </span><span style="color: #000000; ">mac</span><span style="color: #000000; ">.</span><span style="color: #000000; ">upperControlIn</span><span style="color: #000000; "> </span><span style="color: #800000; font-weight: bold; ">&lt;--</span><span style="color: #000000; "> </span><span style="color: #000000; ">upperControlIn</span><span style="color: #000000; ">;

}

</span></pre>
   <hr><p class="footer"><a href="http://creativecommons.org/licenses/by-sa/3.0" target="_top"><img src="by-sa.png"></a> This documentation is released under the <a href="http://creativecommons.org/licenses/by-sa/3.0" target="_top">Creative Commons license</a></p>
   </body>
</html>
